Connectivity Software User's Guide and Reference
Rapid Toolkit for Sparkplug Demos
Rapid Toolkit for Sparkplug > Fundamentals > Product Parts > Rapid Toolkit for Sparkplug Product Parts > Rapid Toolkit for Sparkplug Demos
In This Topic

Sparkplug Demo Edge Node

The Sparkplug Demo Edge Node publishes Sparkplug data, and is intended to show the various Rapid Toolkit for Sparkplug capabilities in terms of Sparkplug metrics and devices.

This functionality is not available under (or the text does not apply to) .NET 8+ development platform.

That is, the demo programs are shipped pre-built for .NET Framework only. However, their source code is available in the Examples, and they can be built for .NET 8+ as well.

Running the Demo Edge Node

You can start the demo edge node from the Launcher (Rapid Toolkit for Sparkplug -> Demos (.NET) -> Sparkplug Edge Node Console Demo). This starts the edge node with default parameters as follows:

If you want to start the demo edge node with different parameters, you need to pass in the parameters explicitly on the command line. The demo edge node program can be found from the product installation folder as Demo-NET\SparkplugEdgeNodeConsoleDemo\SparkplugEdgeNodeConsoleDemo.exe. You can easily start the command prompt directly in the Demo-NET subdirectory from the Launcher: select Rapid Toolkit for Sparkplug ->Demos (.NET) -> Command Prompt. The program can be invoked with up to 4 parameters on the command line. Parameters that are omitted will have the default values.

# Name Description Default Value
1 brokerUrlString The URL of the Sparkplug broker. mqtt://localhost
2 groupId The Sparkplug group ID of this edge node. easyGroup
3 edgeNodeId The Sparkplug edge node ID of this edge node. easySparkplugDemo
4 primaryHostId The host ID of the primary host application that this edge node is associated with (empty to use no primary host application).

other demos and examples are designed in such a way that in most cases, the default settings assure that they will work "out of the box". In order to demonstrate the primary host application functionality, primary host Id "easyApplication" is used in some examples, and you will have to specify it explicitly for them.

Edge Node Contents

The edge node contains metrics and devices that demonstrate different data types, access modes and kinds of behavior. They include:

Communicating with the Edge Node

When the Sparkplug demo edge node is running and communicating with the MQTT broker, any Sparkplug host application can connect to the broker and subscribe to the values of the metrics published by the edge node. By the default, the MQTT broker is located on the same computer as the edge node, and its URL is "mqtt://localhost".

Use SparkplugCmd Utility as a Host Application

If you have the SparkplugCmd utility (e.g. if you have installed Rapid Toolkit for Sparkplug using the Connectivity Software Setup program, or obtained the SparkplugCmd separately e.g. through ClickOnce deployment), you can use it for verification of the demo edge node. For more information, see Using SparkplugCmd Utility as Sparkplug host application.

Sparkplug Edge Node in SparkplugCmd

See Using SparkplugCmd Utility as Sparkplug Edge Node.

Sparkplug Demo Host Application

The Sparkplug demo host application consumes Sparkplug data and displays them. It shows the incoming data without further processing them in any way. The host application subscribes to all metrics published directly by the specified Sparkplug edge node, and all its devices.

This functionality is not available under (or the text does not apply to) .NET 8+ development platform.

That is, the demo programs are shipped pre-built for .NET Framework only. However, their source code is available in the Examples, and they can be built for .NET 8+ as well.

Runnig the Sparkplug Demo Host Application

You can start the demo host application from the Launcher (Rapid Toolkit for Sparkplug -> Demos (.NET) -> Sparkplug Application Console Demo). This starts the host application with default parameters as follows:

If you want to start the demo host application with different parameters, you need to pass in the parameters explicitly on the command line. The demo host application can be found from the product installation folder as Demo-NET\SparkplugApplicationConsoleDemo\SparkplugApplicationConsoleDemo.exe. You can easily start the command prompt directly in the Demo-NET subdirectory from the Launcher: select Rapid Toolkit for Sparkplug ->Demos (.NET) -> Command Prompt. The program can be invoked with up to 4 parameters on the command line. Parameters that are omitted will have the default values.

# Name Description Default Value
1 brokerUrlString The URL of the Sparkplug broker. mqtt://localhost
2 groupId The Sparkplug group ID (to subscribe to). easyGroup
3 edgeNodeId The Sparkplug edge node ID (to subscribe to). easySparkplugDemo
4 primaryHostId The Sparkplug host ID of this host application (empty to generate the host ID automatically).

other demos and examples are designed in such a way that in most cases, the default settings assure that they will work "out of the box". In order to demonstrate the primary host application functionality, primary host Id "easyApplication" is used in some examples, and you will have to specify it explicitly for them.

Sparkplug Host Application in SparkplugCmd

See Using SparkplugCmd Utility as Sparkplug host application.

Security Notice

For simplicity in configuration, the Sparkplug demos use insecure connections, and do not use any authentication. A production Sparkplug component and/or its configuration should be secured appropriately. For more information, see Security in Sparkplug.

 

Sparkplug is a trademark of Eclipse Foundation, Inc. "MQTT" is a trademark of the OASIS Open standards consortium. Other related terms are trademarks of their respective owners. Any use of these terms on this site is for descriptive purposes only and does not imply any sponsorship, endorsement or affiliation.